<extend name="Public:base" />
<block name="main">
	<div class="content">
		<section class="location">
			<i class="iconfont">&#xe60f</i> 位置：<a href="{:U('Index/main')}">管理首页</a> &gt; <a href="{:U('index')}">栏目管理</a> &gt; 编辑栏目
		</section>
		<ul class="nav-tabs clearfix">
			<li><a href="{:U('index')}">栏目管理</a></li>
			<li><a href="{:U('add')}">新增栏目</a></li>
			<li class="active">编辑栏目</li>
		</ul>
		<form method="post" action="" id="form">
			<input type="hidden" name="id" id="id" value="{$categoryInfo.id}" />
			<input type="hidden" name="class" id="class" value="{$Think.CONTROLLER_NAME}" />
			<table width="100%" border="0" cellspacing="0" cellpadding="0" class="table">
				<tr>
					<th width="120">栏目名称</th>
					<td><input type="text" name="name" id="name" class="form-control form-control-lg" value="{$categoryInfo.name}" /> <span class="red"> *</span> </td>
				</tr>
				<tr>
					<th>短标题</th>
					<td><input type="text" name="name_en" id="name_en" class="form-control form-control-lg" value="{$categoryInfo.name_en}" /></td>
				</tr>
				<tr>
					<th>所属栏目</th>
					<td>
						<select name="parent_id" class="form-control">
							<option value="0" <if condition="$categoryInfo.parent_id eq 0">selected</if>>无(作为顶级栏目)</option>
							<foreach name="category" item="list">
							<option value="{$list.id}" <if condition="$categoryInfo.parent_id eq $list['id']">selected</if>>{$list.delimiter}<if condition="$list.parent_id neq 0">├─</if>{$list.name}</option>
							</foreach>
						</select>
					</td>
				</tr>
				<tr>
					<th>栏目类型</th>
					<td>
						<select name="model_id" class="form-control">
							<volist name="model" id="data">
							<option value="{$data.id}" <eq name="data.id" value="$categoryInfo.model_id">selected</eq>>{$data.name}</option>
							</volist>
						</select>
					</td>
				</tr>
				<tr>
					<th>栏目标识</th>
					<td><input type="text" name="flag" id="flag" class="form-control" value="{$categoryInfo.flag}" /><span id="tip">栏目标识，为字母或数字</span></td>
				</tr>
				<tr>
					<th>栏目封面</th>
					<td>
						<img id="img1" <if condition="$categoryInfo.thumb eq ''">src="__IMG__/noPhoto.png"<else />src="__ROOT__{$categoryInfo.thumb}"</if> width="120" height="120" />
						<input type="file" name="btn_upload_thumb" id="btn_upload_thumb" />
						<input type="button" class="btn btn-gary cancel" onclick="thumbDel();" value="删除图片" />
						<input type="text" name="thumb" id="thumb" class="form-control" value="{$categoryInfo.thumb}" />
					</td>
				</tr>
				<tr>
					<th>栏目通栏</th>
					<td>
						<img id="img2" <if condition="$categoryInfo.image eq ''">src="__IMG__/noPhoto.png"<else />src="__ROOT__{$categoryInfo.image}"</if> width="120" height="120" />
						<input type="file" name="btn_upload_image" id="btn_upload_image" />
						<input type="button" class="btn btn-gary cancel" onclick="imageDel();" value="删除图片" />
						<input type="text" name="image" id="image" class="form-control" value="{$categoryInfo.image}" />
					</td>
				</tr>
				<tr>
					<th>栏目描述</th>
					<td><textarea name="description" id="description" class="form-control form-control-lg">{$categoryInfo.description}</textarea> </td>
				</tr>
				<tr>
					<th>是否导航显示</th>
					<td>
						<div class="radio">
							<label><input type="radio" name="is_show" value="1" <if condition="$categoryInfo.is_show eq 1">checked</if> /> 显示</label>
						</div>
						<div class="radio">
							<label><input type="radio" name="is_show" value="0" <if condition="$categoryInfo.is_show eq 0">checked</if> /> 不显示</label>
						</div>
					</td>
				</tr>
				<tr>
					<th>栏目状态</th>
					<td>
						<div class="radio">
							<label><input type="radio" name="status" value="1" <if condition="$categoryInfo.status eq 1">checked</if> /> 启用</label>
						</div>
						<div class="radio">
							<label><input type="radio" name="status" value="0" <if condition="$categoryInfo.status eq 0">checked</if> /> 不启用</label>
						</div>
					</td>
				</tr>
				<tr>
					<th>排序</th>
					<td><input type="text" name="order_id" id="order_id" class="form-control form-control-xs"  value="{$categoryInfo.order_id}" /></td>
				</tr>
			</table>
			<div class="well"><button type="submit" class="btn btn-theme" id="submit_save">保 存</button> <button class="btn btn-gary" onclick="javascript:history.back(-1);">返 回</button></div>
		</form>
	</div>
</block>